import request from '@/utils/request'

// 查询检测人员信息列表
export function listWorker(query) {
  return request({
    url: '/prevention/worker/list',
    method: 'get',
    params: query
  })
}

export function listWorkerList(query) {
  return request({
    url: '/prevention/worker/workerList',
    method: 'get',
    params: query
  })
}

// 查询检测人员信息详细
export function getWorker(workerId) {
  return request({
    url: '/prevention/worker/' + workerId,
    method: 'get'
  })
}

// 新增检测人员信息
export function addWorker(data) {
  return request({
    url: '/prevention/worker',
    method: 'post',
    data: data
  })
}

// 修改检测人员信息
export function updateWorker(data) {
  return request({
    url: '/prevention/worker',
    method: 'put',
    data: data
  })
}

// 删除检测人员信息
export function delWorker(workerId) {
  return request({
    url: '/prevention/worker/' + workerId,
    method: 'delete'
  })
}
